GSM Settings verification doc or code wrong



Hi,

i use NM 0.8.6 and try to set a blank gsm number in NM settings.

on [1] and [2] is written for GSM setting:
"""... Many modems do not require PPP for connections to the mobile network and thus this property should be left blank, which allows NetworkManager to select the appropriate settings automatically."""

So i tried to leave the number blank but then nm_connection_verify failed.
The reason is in nm-util/nm-setting-gsm.c:verify() (the code is in 0.8.6 and 0.9 equal):

if (!priv->number) {
		g_set_error (error,
		             NM_SETTING_GSM_ERROR,
		             NM_SETTING_GSM_ERROR_MISSING_PROPERTY,
		             NM_SETTING_GSM_NUMBER);
		return FALSE;
	} else if (!strlen (priv->number)) {
		g_set_error (error,
		             NM_SETTING_GSM_ERROR,
		             NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
		             NM_SETTING_GSM_NUMBER);
		return FALSE;
	}



So what is right? Is a blank number allowed or not? I'm willing to prepare a patch to fix this but i first need to know what the correct behavior should be.


Cheers,

Tom


[1] http://projects.gnome.org/NetworkManager/developers/settings-spec-08.html [2] http://projects.gnome.org/NetworkManager/developers/api/09/ref-settings.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]