X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=genext.c;h=979a7c1d21df606d69028ca249a01605a075a684;hp=cab89ad23a0ed387b974ce68aa7f9228e04ecbd6;hb=4ec1520c572c4099b478897e4a6ee3a28622ca44;hpb=3754d8f73ff7cb55e204f7ede6569028407a00e5 diff --git a/genext.c b/genext.c index cab89ad..979a7c1 100644 --- a/genext.c +++ b/genext.c @@ -30,7 +30,7 @@ int fhuse = 0; struct isdn_cause isdn_cause[128]; struct isdn_location isdn_location[16]; -void _printdebug(const char *function, int line, unsigned long mask, const char *fmt, ...) +void _printdebug(const char *function, int line, unsigned int mask, const char *fmt, ...) { } @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) if (!read_options()) { - PERROR("Failed to read options.conf\n"); + PERROR("%s", options_error); return(-1); } @@ -63,12 +63,13 @@ int main(int argc, char *argv[]) { printf("Usage: %s \n\n", argv[0]); printf("extension: any number for the extension (e.g 200)\n"); - printf("interfaces: internal interface(es) to reach extension (seperated by commas. e.g Int1,Int2)\n"); + printf("interfaces: internal interface(s) to reach extension, NOT port numbers\n"); + printf(" -> seperate multiple interfaces with commas. e.g Int1,Int2\n"); printf("callerid: normal undefined called is (use what your telco assigned you)\n"); return(0); } - SPRINT(pathname, "%s/%s/%s", INSTALL_DATA, options.extensions_dir, argv[1]); + SPRINT(pathname, "%s/%s", EXTENSION_DATA, argv[1]); if (mkdir(pathname, 0755) < 0) { if (errno == EEXIST) @@ -79,13 +80,6 @@ int main(int argc, char *argv[]) memset(&ext, 0, sizeof(ext)); ext.rights = 4; - ext.tout_setup = 120; - ext.tout_dialing = 120; - ext.tout_proceeding = 120; - ext.tout_alerting = 120; - ext.tout_disconnect = 120; -// ext.tout_hold = 900; -// ext.tout_park = 900; ext.cfnr_delay = 20; ext.vbox_codec = CODEC_MONO; UCPY(ext.interfaces, argv[2]); @@ -96,7 +90,7 @@ int main(int argc, char *argv[]) ext.facility = 1; write_extension(&ext, argv[1]); - SPRINT(pathname, "%s/%s/%s/phonebook", INSTALL_DATA, options.extensions_dir, argv[1]); + SPRINT(pathname, "%s/%s/phonebook", EXTENSION_DATA, argv[1]); if (!(fp = fopen(pathname, "w"))) { PERROR("Failed to write phonebook example '%s'.\n", pathname); @@ -118,7 +112,7 @@ int main(int argc, char *argv[]) fclose(fp); } - SPRINT(pathname, "%s/%s/%s/secrets", INSTALL_DATA, options.extensions_dir, argv[1]); + SPRINT(pathname, "%s/%s/secrets", EXTENSION_DATA, argv[1]); if (!(fp = fopen(pathname, "w"))) { PERROR("Failed to write secrets example '%s'.\n", pathname); @@ -142,7 +136,7 @@ int main(int argc, char *argv[]) fprintf(fp, "021250993 manual blowfish 0x012345678\n"); fclose(fp); } - printf("Extension %s created at %s/%s/%s/.\n", argv[1], INSTALL_DATA, options.extensions_dir, argv[1]); + printf("Extension %s created at %s/%s/.\n", argv[1], EXTENSION_DATA, argv[1]); return(0); }