g_strv_length() is only available in GLib 2.6 and later, and we don't
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 26 Mar 2010 22:49:24 +0000 (22:49 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 26 Mar 2010 22:49:24 +0000 (22:49 +0000)
require GLib 2.6, just 2.4 or later.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32301 f5534014-38df-0310-8fa8-9805f1628bb7

tap-diameter-avp.c

index c602d71b8ec00145a120285533b0a23cd6c83182..b65f108877b278ffb3037a2db1f0b4dd0a9e7ab7 100644 (file)
@@ -246,7 +246,9 @@ diameteravp_init(const char *optarg, void* userdata _U_)
 
        /* Split command line options. */
        tokens = g_strsplit(optarg,",", 1024);
-       opt_count=g_strv_length(tokens);
+       opt_count=0;
+       while (tokens[opt_count])
+               opt_count++;
        if (opt_count>2)
                ds->cmd_code=(guint32)atoi(tokens[2]);