On Wed, 30 Apr 2008, Dan Williams wrote:

> On Tue, 2008-04-29 at 11:59 +0200, Markus Becker wrote:
>> Hi,
>>
>> since revision 3456 dialup is not working for me anymore.
>>
>> When dialing in the response I get is:
>>
>> CONNECT 1800000
>>
>> The problem is in nm-serial-device.c find_terminators(), which does not
>> think that the answer above is a terminator.
>>
>> This patch worked for me, but might also find the terminator in the middle
>> of the line, which might not be wanted for other reponses.
>>
>> Index: src/nm-serial-device.c
>> ===================================================================
>> --- src/nm-serial-device.c      (revision 3615)
>> +++ src/nm-serial-device.c      (working copy)
>> @@ -566,7 +566,7 @@
>>          int i;
>>
>>          for (i = 0; terminators[i]; i++) {
>> -               if (!strcasecmp (line, terminators[i]))
>> +               if (strcasestr (line, terminators[i]))
>
> That should probably be a strncasecmp().  We don't want strcaststr()
> because that might find a terminator in the middle of the line, and we
> don't want that.  Modem responses will be on the beginning of the line,
> and that's what we'll be matching against.

if (strncasecmp (line, terminators[i], strlen(terminators[i])))

Works for me.

Thanks, Markus

>
> I'll code up strncasecmp() and see if that works for me.  In the mean
> time, could you test that out and report whether it seems to work for
> you too?
>
> Thanks!
> Dan
>
>
>>                          return TRUE;
>>          }
>>          return FALSE;
>>
>>
>>
>> BR,
>> Markus
>> _______________________________________________
>> NetworkManager-list mailing list
>> [email protected]
>> http://mail.gnome.org/mailman/listinfo/networkmanager-list
>
_______________________________________________
NetworkManager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to