moan about trashing in non-UIDPLUS boxes
... as that's inherently racy, as the manual says.
This commit is contained in:
		
							parent
							
								
									edbf9a35da
								
							
						
					
					
						commit
						6fe7172901
					
				
					 2 changed files with 12 additions and 3 deletions
				
			
		|  | @ -107,7 +107,8 @@ BIT_ENUM( | ||||||
| #define STORE(store) \ | #define STORE(store) \ | ||||||
| 	store *next; \ | 	store *next; \ | ||||||
| 	driver_t *driver; \ | 	driver_t *driver; \ | ||||||
| 	store##_conf *conf;  /* foreign */ | 	store##_conf *conf;  /* foreign */ \ | ||||||
|  | 	uchar racy_trash; | ||||||
| 
 | 
 | ||||||
| typedef struct store { | typedef struct store { | ||||||
| 	STORE(struct store) | 	STORE(struct store) | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								src/sync.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/sync.c
									
										
									
									
									
								
							|  | @ -813,8 +813,16 @@ box_opened2( sync_vars_t *svars, int t ) | ||||||
| 		else if (chan->ops[N] & (OP_OLD | OP_NEW | OP_UPGRADE)) | 		else if (chan->ops[N] & (OP_OLD | OP_NEW | OP_UPGRADE)) | ||||||
| 			opts[F] |= OPEN_FLAGS; | 			opts[F] |= OPEN_FLAGS; | ||||||
| 	} | 	} | ||||||
| 	svars->opts[F] = svars->drv[F]->prepare_load_box( ctx[F], opts[F] ); | 	for (t = 0; t < 2; t++) { | ||||||
| 	svars->opts[N] = svars->drv[N]->prepare_load_box( ctx[N], opts[N] ); | 		svars->opts[t] = svars->drv[t]->prepare_load_box( ctx[t], opts[t] ); | ||||||
|  | 		if (opts[t] & ~svars->opts[t] & OPEN_UID_EXPUNGE) { | ||||||
|  | 			if (!ctx[t]->racy_trash) { | ||||||
|  | 				ctx[t]->racy_trash = 1; | ||||||
|  | 				notice( "Notice: Trashing in Store %s is prone to race conditions.\n", | ||||||
|  | 				        svars->chan->stores[t]->name ); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	ARRAY_INIT( &mexcs ); | 	ARRAY_INIT( &mexcs ); | ||||||
| 	if ((svars->opts[F] & OPEN_PAIRED) && !(svars->opts[F] & OPEN_OLD) && chan->max_messages) { | 	if ((svars->opts[F] & OPEN_PAIRED) && !(svars->opts[F] & OPEN_OLD) && chan->max_messages) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue