[sr-dev] git:master:1391db0f: dispatcher: Increase line buffer size

Stefan Mititelu stefan.mititelu at onem.com
Tue Jul 4 12:33:15 CEST 2017


Module: kamailio
Branch: master
Commit: 1391db0f349956795b8cf6936657fb974ec9b65f
URL: https://github.com/kamailio/kamailio/commit/1391db0f349956795b8cf6936657fb974ec9b65f

Author: Stefan Mititelu <stefan.mititelu at onem.com>
Committer: Stefan Mititelu <stefan.mititelu at onem.com>
Date: 2017-07-04T13:06:26+03:00

dispatcher: Increase line buffer size

---

Modified: src/modules/dispatcher/dispatch.c

---

Diff:  https://github.com/kamailio/kamailio/commit/1391db0f349956795b8cf6936657fb974ec9b65f.diff
Patch: https://github.com/kamailio/kamailio/commit/1391db0f349956795b8cf6936657fb974ec9b65f.patch

---

diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 38a6213de1..b970c94b44 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -623,7 +623,7 @@ int reindex_dests(ds_set_t *node)
 /*! \brief load groups of destinations from file */
 int ds_load_list(char *lfile)
 {
-	char line[256], *p;
+	char line[1024], *p;
 	FILE *f = NULL;
 	int id, setn, flags, priority;
 	str uri;
@@ -650,7 +650,7 @@ int ds_load_list(char *lfile)
 	*next_idx = (*crt_idx + 1) % 2;
 	ds_avl_destroy(&ds_lists[*next_idx]);
 
-	p = fgets(line, 256, f);
+	p = fgets(line, 1024, f);
 	while(p) {
 		/* eat all white spaces */
 		while(*p && (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n'))
@@ -728,7 +728,7 @@ int ds_load_list(char *lfile)
 			LM_WARN("unable to add destination %.*s to set %d -- skipping\n",
 					uri.len, uri.s, id);
 	next_line:
-		p = fgets(line, 256, f);
+		p = fgets(line, 1024, f);
 	}
 
 	if(reindex_dests(ds_lists[*next_idx]) != 0) {




More information about the sr-dev mailing list