mirror of
				https://github.com/samba-team/samba.git
				synced 2025-10-30 08:23:49 +03:00 
			
		
		
		
	r26315: Avoid using lp_ functions in libcharset.
This commit is contained in:
		
				
					committed by
					
						 Stefan Metzmacher
						Stefan Metzmacher
					
				
			
			
				
	
			
			
			
						parent
						
							aa98a1781c
						
					
				
				
					commit
					db6dd425e3
				
			| @@ -283,3 +283,19 @@ _PUBLIC_ const char *lp_messaging_path(TALLOC_CTX *mem_ctx, | ||||
| 	return smbd_tmp_path(mem_ctx, lp_ctx, "messaging"); | ||||
| } | ||||
|  | ||||
| struct smb_iconv_convenience *global_smb_iconv_convenience = NULL; | ||||
|  | ||||
| struct smb_iconv_convenience *smb_iconv_convenience_init_lp(TALLOC_CTX *mem_ctx, | ||||
| 							 struct loadparm_context *lp_ctx) | ||||
| { | ||||
| 	return smb_iconv_convenience_init(mem_ctx, lp_dos_charset(lp_ctx), | ||||
| 					  lp_unix_charset(lp_ctx), | ||||
| 					  lp_display_charset(lp_ctx), | ||||
| 		lp_parm_bool(lp_ctx, NULL, "iconv", "native", true)); | ||||
| } | ||||
|  | ||||
| _PUBLIC_ void reload_charcnv(void) | ||||
| { | ||||
| 	talloc_free(global_smb_iconv_convenience); | ||||
| 	global_smb_iconv_convenience = smb_iconv_convenience_init_lp(talloc_autofree_context(), global_loadparm); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user