dispatcher: fix weight attr comparison
authorOvidiu Sas <osas@voipembedded.com>
Wed, 14 May 2014 20:07:24 +0000 (16:07 -0400)
committerOvidiu Sas <osas@voipembedded.com>
Wed, 14 May 2014 20:07:24 +0000 (16:07 -0400)
modules/dispatcher/dispatch.c

index 56d2f06..23b516a 100644 (file)
@@ -227,7 +227,7 @@ int ds_set_attrs(ds_dest_t *dest, str *attrs)
                                && strncasecmp(pit->name.s, "duid", 4)==0) {
                        dest->attrs.duid = pit->body;
                } else if(pit->name.len==6
-                               && strncasecmp(pit->name.s, "weight", 4)==0) {
+                               && strncasecmp(pit->name.s, "weight", 6)==0) {
                        str2sint(&pit->body, &dest->attrs.weight);
                } else if(pit->name.len==7
                                && strncasecmp(pit->name.s, "maxload", 7)==0) {