diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-01-12 14:58:49 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-01-12 14:58:49 +0100 |
commit | 4e3c360377bc9b792c2fac83e9402d7531f79bbe (patch) | |
tree | e4409fb32ed7c391f48c3c2699997fc5b75137a1 /src/ipcpd/ipcp.c | |
parent | 7cad036f812a87aafd7c0e8ed4cbea76fb4cb097 (diff) | |
parent | 15e9b779385c71d366776b83540e19e0735c4e66 (diff) | |
download | ouroboros-4e3c360377bc9b792c2fac83e9402d7531f79bbe.tar.gz ouroboros-4e3c360377bc9b792c2fac83e9402d7531f79bbe.zip |
Merged in sandervrijders/ouroboros/be-gam (pull request #345)
Be gam
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r-- | src/ipcpd/ipcp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index 2e4c3fca..a94e268d 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -128,6 +128,7 @@ static void * ipcp_main_loop(void * o) conf.min_pdu_size = conf_msg->min_pdu_size; conf.max_pdu_size = conf_msg->max_pdu_size; conf.addr_auth_type = conf_msg->addr_auth_type; + conf.dt_gam_type = conf_msg->dt_gam_type; } if (conf_msg->ipcp_type == IPCP_SHIM_UDP) { conf.ip_addr = conf_msg->ip_addr; @@ -440,22 +441,26 @@ int ipcp_parse_arg(int argc, char * argv[]) if (atoi(argv[1]) == 0) return -1; - if (argv[2] == NULL) + ipcpi.irmd_api = atoi(argv[1]); + + /* argument 2: IPCP name */ + ipcpi.name = argv[2]; + + /* argument 3: logfile name (if any) */ + if (argv[3] == NULL) return 0; len += strlen(INSTALL_PREFIX); len += strlen(LOG_DIR); - len += strlen(argv[2]); + len += strlen(argv[3]); log_file = malloc(len + 1); - if (log_file == NULL) { - LOG_ERR("Failed to malloc"); + if (log_file == NULL) return -1; - } strcpy(log_file, INSTALL_PREFIX); strcat(log_file, LOG_DIR); - strcat(log_file, argv[2]); + strcat(log_file, argv[3]); log_file[len] = '\0'; if (set_logfile(log_file)) |