1
0
Fork 0

minor bug fix.

This commit is contained in:
bagyenda 2005-04-01 12:32:25 +00:00
parent 1b08584a1a
commit 3a5ac7c59e
2 changed files with 11 additions and 11 deletions

View File

@ -38,18 +38,18 @@ static Octstr *mms_detokenize(Octstr * token)
if (script == NULL || octstr_len(script) == 0)
return NULL;
cmd = octstr_format("%s '%s'", octstr_get_cstr(script), octstr_get_cstr(token));
info(0, "Calling \"%s\"", octstr_get_cstr(cmd));
info(0, "Calling \"%s\"", octstr_get_cstr(cmd));
if ((fp = popen(octstr_get_cstr(cmd), "r"))) {
if (fgets(buf, 4096, fp) == buf) {
msisdn = octstr_create(buf);
octstr_strip_crlfs(msisdn);
}
pclose(fp);
}
octstr_destroy(cmd);
return msisdn;
if (fgets(buf, sizeof buf, fp) != NULL) {
msisdn = octstr_create(buf);
octstr_strip_crlfs(msisdn);
}
pclose(fp);
}
octstr_destroy(cmd);
return msisdn;
}
/* The function itself. */

View File

@ -303,7 +303,7 @@ Octstr *mms_find_sender_msisdn(Octstr **send_url, List *request_hdrs, Octstr *ms
if (octstr_len(p) > 0)
octstr_format_append(s, "/%S", p);
}
octstr_destroy(send_url);
octstr_destroy(*send_url);
*send_url = s;
}
if (l)