Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 67060 | Differences between
and this patch

Collapse All | Expand All

(-)smbpwman-0.5.orig/smbpwcommon.c (-1 / +20 lines)
Lines 255-260 Link Here
255
	ssize_t len;
255
	ssize_t len;
256
	char result = 0xff;
256
	char result = 0xff;
257
	char *password = 0;
257
	char *password = 0;
258
	int attempts = 3;
259
	int delay = 1;
258
260
259
	cs = smbpw_unix_connect(SOCKET_NAME);
261
	cs = smbpw_unix_connect(SOCKET_NAME);
260
262
Lines 260-266 Link Here
260
262
261
	if(cs < 0)
263
	if(cs < 0)
262
	{
264
	{
263
		cs = smbpw_unix_connect(SOCKET_NAME);
265
		while(attempts > 0)
266
		{
267
			attempts--;
268
			sleep(delay);
269
			delay = delay * 2;
270
271
			cs = smbpw_unix_connect(SOCKET_NAME);
272
			if(cs >= 0)
273
			{
274
				break;
275
			}
276
		}
277
	}
278
279
	if(cs < 0)
280
	{
281
		// could not connect to server
282
		return password;
264
	}
283
	}
265
284
266
	// retrieve
285
	// retrieve

Return to bug 67060