wvdial does not correctly build the argv array to exec pppd. Depending on the configuration of the dialer section to be called the argv array contains NULL argument pointers followed by non NULL arguemnt pointers (specifically an unset remote_name causes this bug to show). This argv is passed unchanged to execvp(). Since exec*() stops on the first NULL in the argument array the arguments follwing the first NULL are never passed to pppd (which means ppp never sees "call wvdial" and all (new) connections fail (at least in my case)). This Problem applies to rp3 also since it uses the same code from wvdial. Patch file will be attached to this bug report.
Since createattachment.cgi always fails with "no file provided or file emtpy" here we go: --- wvdial-1.40/wvdial/wvdialer.cc.braindamage Fri Dec 31 00:36:37 1999 +++ wvdial-1.40/wvdial/wvdialer.cc Fri Dec 31 00:51:53 1999 @@ -595,6 +595,7 @@ /************************/ { WvString addr_colon( "%s:", options.force_addr ); + int i; char const *argv[] = { options.where_pppd, @@ -605,12 +606,28 @@ "-detach", "user", options.login, options.force_addr[0] ? (const char *)addr_colon : "noipdefault", - remote_name ? "remotename" : NULL, - remote_name ? remote_name : NULL, - options.new_pppd ? "call" : NULL, - options.new_pppd ? "wvdial" : NULL, + NULL, + NULL, + NULL, + NULL, NULL }; + + /* XXX FIXME: This is a gross hack but works */ + /* The older method did _not_ work since exec*() argv */ + /* parsing stops on the first NULL, so pppd never gets */ + /* "call wvdial" as arguemnts when no remote_name is */ + /* provided. Someone speaking C++ should have a look at this */ + i = 8; + if(remote_name) { + argv[i++] = "remotename"; + argv[i++] = remote_name; + } + + if(options.new_pppd) { + argv[i++] = "call"; + argv[i++] = "wvdial"; + } if( !chat_mode && (access( options.where_pppd, X_OK ) != 0) ) { err( "Unable to run %s.\n", options.where_pppd );
This should be fixed in wvdial-1.41-1, which is now in Raw Hide.